<?php
/**
 * @package		Joomla.Site
 * @subpackage	com_content
 * @copyright	Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;

// Create a shortcut for params.
$params = &$this->item->params;
$images = json_decode($this->item->images);
$canEdit	= $this->item->params->get('access-edit');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.framework');

$metadata = json_decode($this->item->metadata);

?>

				<div class="block-car">
					<div class="filter-item" rel="make"><?php echo trim($metadata->make) ?></div>
					<div class="filter-item" rel="model"><?php echo trim($metadata->model) ?></div>
					<div class="filter-item" rel="price"><?php echo trim($metadata->price) ?></div>
					<div class="filter-item" rel="year"><?php echo trim($metadata->year) ?></div>
					<div class="filter-item" rel="reg_date"><?php echo trim($metadata->registration_date) ?></div>
					<div class="filter-item" rel="transmission"><?php echo trim($metadata->transmission) ?></div>
					<div class="filter-item" rel="status"><?php echo trim($metadata->status) ?></div>

					<div class="car1">
						<img alt="" src="<?php echo htmlspecialchars($metadata->carimage1); ?>">
					</div>
					<div class="car2">
						<h3><?php echo $this->escape($this->item->title); ?></h3>
						<p><?php echo $metadata->price ?></p>
						<p><?php echo $metadata->year ?></p>
						<p><?php echo $metadata->registration_date ?></p>
						<p><?php echo $metadata->transmission ?></p>
						<p><?php echo $metadata->mileage ?> km</p>
						<p><a <?php if($metadata->status != "Available") { echo 'class="red"'; } ?> href="#"><?php echo $metadata->status ?></a></p>
					</div>
					<div class="car3">
						<p><?php echo substr(strip_tags($this->item->introtext),0,258) ?>...</p>
						<ul>
							<li><a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>">MORE DETAILS</a></li>
							<li><a href="contact-us">CONTACT US</a></li>
						</ul>
					</div>
				</div><!--block-car-->

<?php echo $this->item->event->afterDisplayContent; ?>
